<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>子绝父相</title>
		<style type="text/css">
			.div1{
				position: relative;
				width: 300px;
				height: 300px;
				background-color: #FFC0CB;
			}
			.div2{
				position: absolute;
				width: 100px;
				height: 100px;
				background-color: aquamarine;
				left: 50%;
				top: 50%;
				transform: translate(-50%,-50%);
			}
		</style>
	</head>
	<body>
		<div class="div1">
			<div class="div2">
				
			</div>
		</div>
	</body>
</html>
